﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Gmis.Public;
using System.Data;
namespace Gmis.Web.UI
{
	public partial class LeaveWordList : System.Web.UI.Page
	{
		protected void Page_Load(object sender, EventArgs e)
		{

		}

        public string GetLeaveWord()
        {
            BLL.LeaveWord bll = new BLL.LeaveWord();
            DataSet ds = bll.GetList(" datalength(replyContents) <> 0 and IsShow=1 order by leaveWordTime desc");//news n  column c  village v
            if (ds == null || ds.Tables[0].Rows.Count < 1)
            {
                return "";
            }
            string returnValue = "";
            foreach (DataRow dr in ds.Tables[0].Rows)
            {
                string sTitle = dr["Title"].ToString();
                //sTitle = sTitle.Length > 15 ? sTitle.Substring(0, 15) : sTitle;
                returnValue += string.Format("<li><a href=\"LeaveWordDetail.aspx?Id={0}\" target=\"_blank\"><h2>{1}</h2></a></li>", dr["Id"].ToString(), sTitle);
            }
            return returnValue;

        }
	}
}